<?php
require_once 'mods/class_generic_object.php';
class SdpHistory extends GenericObject
{
    public function __construct()
    {
        parent::__construct();
        $this->_tableName=null;
        $this->_properties['id']=null;
        $this->_properties['uid']=null;
        $this->_properties['date']=null;
        $this->_properties['group']=null;
        $this->_properties['author']=null;
        $this->_properties['event']=null;
        $this->_properties['description']=null;
        $this->_properties['group_name']=null;
        $this->_properties['author_name']=null;
        $this->_properties['event_name']=null;
    }

    public function set($id,$uid,$date,$group,$author,$event,$description,$group_name = null,$author_name = null,$event_name = null)
    {
        $this->id=$id;
        $this->uid=$uid;
        $this->date=$date;
        $this->group=$group;
        $this->author=$author;
        $this->event=$event;
        $this->description=$description;
        $this->group_name=$group_name;
        $this->author_name=$author_name;
        $this->event_name=$event_name;
    }

    public function save()
    {
        $this->insert();
    }

    public function insert()
    {
        $values=array();
        $values['id']='#id#';
        $values['uid']=$this->uid;
        $values['date']='now';
        $values['"group"']=$this->group;
        $values['"author"']=$this->author;
        $values['event']=$this->event;
        $values['description']=$this->description;
        $this->_db->insert($this->_tableName,$values);
    }

    public function load($id = null)
    {}
}
?>